package com.tc.vms.exception;

/**
 * Created by yonghua.zhang on 2015/12/10.
 */
public class VmsClientRuntimeException extends RuntimeException {
    private final int respCode;
    private final String errMsg;

    public VmsClientRuntimeException(String errMsg, int respCode) {
        super(errMsg);
        this.respCode = respCode;
        this.errMsg = errMsg;
    }

    public VmsClientRuntimeException(String message) {
        super(message);
        this.errMsg = message;
        this.respCode = VmsClientErrorCode.VMS_SYS_RUNTIME_ERR_DEFAULT;
    }

    public VmsClientRuntimeException(String message, Throwable cause) {
        super(message, cause);
        this.errMsg = message;
        this.respCode = VmsClientErrorCode.VMS_SYS_RUNTIME_ERR_DEFAULT;
    }

    public VmsClientRuntimeException(Throwable cause) {
        super(cause);
        this.errMsg = cause.getMessage();
        this.respCode = VmsClientErrorCode.VMS_SYS_RUNTIME_ERR_DEFAULT;
    }

    public int getRespCode() {
        return respCode;
    }

    public String getErrMsg() {
        return errMsg;
    }
}
